<!--
* 方法:Basic.vue
* 描述:系统基本
* 作者:Jimmy
* 日期:2018-08-01
*/
-->
<template>
    <div>
        <BasicList v-show="list" @toggle="show"></BasicList>
        <BasicInfo v-show="info" @toggle="show" v-bind:data="data" v-if="info"></BasicInfo>
    </div>
</template>
<script>
import BasicList from './components/Basic-list.vue'
import BasicInfo from './components/Basic-info.vue'
export default {
  components: {
    BasicList,
    BasicInfo
  },
  data () {
    return {
      list: true,
      info: false,
      data: ''
    }
  },
  methods: {
    show (data) {
      if (data.type === 'list') {
        this.list = true
        this.info = false
      } else {
        this.$nextTick()
        this.list = false
        this.info = true
        this.data = data
      }
    }
  }
}
</script>
